package com.wang.study.service;

import com.wang.study.annotation.MyAnnotation;
import com.wang.study.model.User;

import java.util.List;
import java.util.Map;

public interface UserService {
    //通过用户名查找判断用户是否存在
    Boolean checkUserName(String username);
    //注册密码是否为空信息
    Boolean checkPassword(String password);
    //判断是否激活用户
    Boolean checkEmail(String email);
    //获取注册信息
    @MyAnnotation
    Map<String,String> register(User user);
    //邮件激活业务操作
    @MyAnnotation
    void active(String activeCode);
    //获取登录信息
    Map<String, Object> login(User user);

    List<User> findUserAll();
    @MyAnnotation
    Integer delUserById(Integer id);
    @MyAnnotation
    Integer addUser(String account,String password,String email,Integer status);
    @MyAnnotation
    Integer updateUserById(String account,String password,String email,Integer status,Integer id);
    @MyAnnotation
    Integer updatePwd(String username, String md5);

    User selectUserByUsername(String username);
}
